package com.h3bpm.web.controller;


import OThinker.Common.Data.Database.Parameter;
import OThinker.Common.Data.DbType;
import OThinker.Common.Organization.Models.User;
import OThinker.H3.Controller.ControllerBase;
import OThinker.H3.Controller.RestfulApi.cloudpivot.ResponseResult;
import OThinker.H3.Entity.Instance.Data.InstanceData;
import OThinker.H3.Entity.WorkItem.WorkItemModels.WorkItem;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.h3bpm.web.service.LegalLetterService;
import data.DataException;
import data.DataRow;
import data.DataRowCollection;
import data.DataTable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 法务函
 *
 * @author leo
 */
@RequestMapping("/api/legalLetter")
@RestController
public class LegalLetterController extends ControllerBase {
    @Autowired
    LegalLetterService legalLetterService;

    private static final Logger logger = LoggerFactory.getLogger(LegalLetterController.class);

    /**
     * 获取法务函编号
     *
     * @param
     * @return ResponseResult
     */
    @RequestMapping("/getLegalLetterNum")
    public void getLegalLetterNum(String objectId) {
        if (objectId == null) {
            logger.info("获取法务函编号参数为空");
            return;
        }

        try {
            logger.info("获取法务函编号objectId = {} ",objectId);
            boolean bool = legalLetterService.getLegalLetterNum(objectId);
            if (bool) {
                logger.info("获取法务函编号成功");
            } else {
                logger.info("获取法务函编号失败");
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @Override
    public String getFunctionCode() {
        return null;
    }


}
